/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
         http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once

#include <几何数据.h>

#include "引擎枚举数据.h"
#include "S_Object.h"

bool f_window_Init();


S_Window* f_window_创建(std::string 标题, S_设备环境& Ctx, bool 显示 = true, ivec4 rect = { 0, 0, 1024, 576 });
S_Window* f_window_创建(S_设备环境& Ctx, std::string 标题, ivec4 rect);

ivec2 f_window_get焦点窗口大小();

EngineAPI_EXPORT S_Window* f_创建VK窗口(std::string 标题, S_设备环境& Ctx, int32 x = 0, int32 y = 0, int32 w = 1024, int32 h = 576, std::string dllPath = "");

EngineAPI_EXPORT S_Window* f_创建DX窗口(std::string 标题, S_设备环境& Ctx, int32 x = 0, int32 y = 0, int32 w = 1024, int32 h = 576, std::string dllPath = "");

EngineAPI_EXPORT void       f_window_销毁(S_Window* 窗口);



EngineAPI_EXPORT void f_window_set输入法窗口位置(const ivec2& pos);
EngineAPI_EXPORT void f_window_set窗口标题(S_Window* window, std::wstring 标题);

EngineAPI_EXPORT vec2 f_window_get当前窗口大小();

EngineAPI_EXPORT void f_window_清除UI(S_Window* window);
EngineAPI_EXPORT void f_window_安装UI(S_Window* window, C_Widget* ui);

EngineAPI_EXPORT S_UI渲染环境* f_window_getUI环境(S_Window* window);
EngineAPI_EXPORT C_Widget管理* f_window_getUI管理(S_Window* window);

EngineAPI_EXPORT void f_window_set显示(S_Window* window, bool 显示);

EngineAPI_EXPORT void f_window_加载图标(S_Window* window, std::string 组名称, const std::filesystem::path& path);
EngineAPI_EXPORT void f_window_加载字体(S_Window* window, std::string 字体, uint16 字号);


void f_window_轮询(S_Window** window, uint32 num, bool& 退出, bool& 暂停);
void f_window_等待();
void f_window_触发消息(S_Window** window, uint32 num);


bool f_window_set鼠标样式(E_鼠标样式 样式);


